<?php
/*if($child == ""){
    echo 'Chưa có tài liệu ở danh mục này';
    break;
}*/
//var_dump($child);//die();
function matchType($string){
    return ltrim($string,'.');
}//maptype file

?>

<div id="content_right" >
<div id="search1">
    <div id="search" class="search">
        <form method="get" action="">
            <input id="Searchbt" class="btnsearch2" type="image" style="border-width:0px;" onclick="return CheckSearch();" src="<?php echo base_url();?>public/css/images/search_buton.png" name="btSearch2"></input>
            <div class="text_search">
                <input id="Searchbt1" class="btnsearch1" type="image" style="border-width:0px;" onclick="return CheckSearch();" src="<?php echo base_url();?>public/css/images/search_icon.png" name="btSearch1"></input>
                <input id="search_field" type="text" name="search" value="Tìm kiếm nhân sự..." class="search_field"></input>
            </div>

        </form>

    </div><!---End search--->
</div>
<div id="path">
    <div id="adress_path" >
        <?php echo $breakcrum;?>

    </div><!---End adress_path--->
    <div id="actionid">

        <form method="get" action="">
            <input id="help" class="help" type="image" style="border-width:0px;" onclick="return CheckSearch();" src="<?php echo base_url();?>public/css/images/button_help.png" name="btSearch2"></input>
            <a class="fancybox fancybox.ajax" href="http://localhost:8080/CIfw/index.php/upload/do_upload"><input id="upfile" class="upfile" type="image" style="border-width:0px;"  src="<?php echo base_url();?>public/css/images/button_upfile.png" name="btSearch1"></input></a>
        </form>
    </div>
</div>
<div class="clear"></div>
<div id="content_detail" >
<table>
<thead>
<tr>
    <th><b>STT</b></th>
    <th class="hname"><b>Tên tài liệu</b></th>
    <th class="htype"><b>Loại file</b></th>
    <!--<th><b>Ngôn ngữ</b></th>-->
    <th><b>Ngày cập nhật</b></th>
    <th><b>Up load bởi</b></th>
    <th><b>Edit</b></th>
</tr>
</thead>
<tbody>
<?php
//var_dump($child);die();

foreach($child as $item):?>
<tr>
    <td><?php echo ++$index;?></td>

    <td class ="cellname"><a href="<?php echo base_url('uploads').'/'.$item->idCat.'/'.$item->name.$item->type;?>"><?php echo $item->name;?></a></td>
    <td>
        <div id="<?php echo matchType($item->type);?>"></div>
<!--        <img idstyle="border: 0px solid #333333;padding: 2px; margin: 2px;" src="--><?php //echo base_url();?><!--public/css/images/icon_doc.png"></img>-->
       <!-- <img style="border: 0px solid #333333;padding: 2px; margin: 2px;" src="<?php /*echo base_url();*/?>public/css/images/icon_pdf.png"></img>
        <img style="border: 0px solid #333333;padding: 2px; margin: 2px;" src="<?php /*echo base_url();*/?>public/css/images/icon_pre.png"></img>-->
    </td>
    <!--<td>
        <?php /*echo $item->lang;*/?>
    </td>-->
    <td><?php echo $item->timeup;?></td>
    <td><?php echo $item->id_ns;?></td>
    <td><a class="fancybox fancybox.ajax" href="<?php echo site_url('upload/get/update/'.$item->id);?>">Edit</a> </td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
    <td >

    </td>
</tr>
</tfoot>

</table>
<div id="page_left">
    Tổng số:<b><span style="color: red;"><?php echo $countItem;?> </span>kết quả</b>
</div>
<div id="page_right">
    <b>
        <?php echo $pagination;?>
    </b>
</div>
</div><!---End content_detail--->
</div><!---End content_right--->
<li><a class="fancybox fancybox.ajax" href="<?php echo site_url('upload/task/update');?>">Update category</a></li>
<li><a class="fancybox fancybox.ajax" href="<?php echo site_url('upload/task/set');?>">Inset Cat</a></li>
<li><a class="fancybox fancybox.ajax" href="<?php echo site_url('support/view/insert');?>">Inset file type</a></li>
<li><a class="fancybox fancybox.ajax" href="<?php echo site_url('support/view/getsp');?>">delete file type</a></li>